﻿using NearAop;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace CS
{
    [AddNotifyPropertyChanged]
    class T02_静态属性变更通知
    {
        //静态属性需要自行创建PropertyChanged事件
        public static event PropertyChangedEventHandler PropertyChanged;

        public static int MyProperty { get; set; }

        public static void Test()
        {
            PropertyChanged +=
                (s, e) => Console.WriteLine($"静态属性{e.PropertyName}被修改");
            MyProperty += 1;
        }
    }
}
